package io.zsy.hello.autowire;

/**
 * @author zhangshuaiyin
 * @date 2022/4/21 22:05
 */
public class OrderService {
    private OrderDao orderDao;

    public OrderService(OrderDao orderDao) {
        System.out.println("autowire constructor");
        this.orderDao = orderDao;
    }

    public OrderService() {
    }

    public void setOrderDao(OrderDao orderDao) {
        this.orderDao = orderDao;
    }

    @Override
    public String toString() {
        return "OrderService{" +
                "orderDao=" + orderDao +
                '}';
    }
}
